package com.movitech.mobile.cz.base.modules.config;

/**
 * 供方状态（内网）枚举
 * @author Jack.Gong
 * @since 2018-03-07
 *
 */
public enum SupplierStatusEnum {

	PENDING_MODIFY("待修改", "1"),
	QUALIFICATION_INSPECTION("资质审查", "2"),
	SITE_INSPECTION("现场考察", "3"),
	STORE_APPROVE("入库审批", "4"),
	SITE_INSPECTION_ING("现场考察中", "5"),
	STORE_APPROVE_ING("入库审批中", "6"),
	PENDING_WATCH("待观察", "7"),
	QUALIFIED("合格", "8"),
	TURN_TO_PENDING_WATCH("转待观察审批中", "9"),
	TURN_TO_UNQUALIFIED("转不合格审批中", "10"),
	TURN_TO_BLACK_LIBRARY("转黑库审批中", "11"),
	UNQUALIFIED("不合格", "12"),
	TURN_TO_POTENTIAL("转潜在审批中", "13"),
	BLACK_LIBRARYS("黑库", "14"),
	REPULSE("审批被打回", "99");


	private String desc;
	private String code;

	private SupplierStatusEnum(String desc, String code){
		this.desc = desc;
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public static String getDesc(String code) {
		for (SupplierStatusEnum c : SupplierStatusEnum.values()) {
			if (c.getCode().equals(code)) {
				return c.getDesc();
			}
		}
		return null;
	}

}
